/* points.css - 积分中心页面特定样式 */

/* 积分概览卡片 */
.points-overview {
  background-color: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 2rem;
}

.points-overview__header {
  padding: 2rem;
  background-color: var(--color-primary);
  color: white;
  text-align: center;
  position: relative;
}

.points-overview__title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.points-overview__value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.points-overview__change {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
}

.points-overview__change--positive {
  color: var(--color-success);
}

.points-overview__change--negative {
  color: var(--color-danger);
}

.points-overview__body {
  padding: 1.5rem;
}

.points-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .points-stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.points-stat {
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
}

.points-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.points-stat__label {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.6);
}

/* 任务卡片 */
.points-task-card {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.points-task-card__header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.points-task-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.points-task-card__icon {
  margin-right: 0.5rem;
  color: var(--color-primary);
}

.points-task-card__body {
  padding: 1.5rem;
}

/* 任务列表 */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.task-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.task-item__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(45, 106, 79, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-right: 1rem;
  flex-shrink: 0;
}

.task-item__content {
  flex: 1;
}

.task-item__title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.task-item__description {
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.6);
}

.task-item__rewards {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.task-item__points {
  background-color: rgba(45, 106, 79, 0.1);
  color: var(--color-primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.task-item__points i {
  margin-right: 0.25rem;
}

.task-item__button {
  padding: 0.5rem 1rem;
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: auto;
  transition: background-color 0.2s;
}

.task-item__button:hover {
  background-color: var(--color-primary);
  opacity: 0.9;
}

.task-item__button:disabled {
  background-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
  cursor: not-allowed;
}

.task-item__status {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  margin-left: auto;
}

.task-item__status--completed {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--color-success);
}

.task-item__status--progress {
  background-color: rgba(255, 152, 0, 0.1);
  color: var(--color-warning);
}

/* 积分历史 */
.points-history {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.points-history__header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.points-history__title {
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.points-history__icon {
  margin-right: 0.5rem;
  color: var(--color-primary);
}

.points-history__body {
  max-height: 400px;
  overflow-y: auto;
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.history-item__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.history-item__icon--earned {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--color-success);
}

.history-item__icon--spent {
  background-color: rgba(230, 57, 70, 0.1);
  color: var(--color-danger);
}

.history-item__content {
  flex: 1;
}

.history-item__description {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.history-item__date {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
}

.history-item__points {
  font-weight: 600;
  margin-left: auto;
}

.history-item__points--earned {
  color: var(--color-success);
}

.history-item__points--spent {
  color: var(--color-danger);
}
